package com.aspire.nm.component.miniServerDemo.server.plugins;

import java.lang.reflect.Method;

import com.aspire.nm.component.miniServer.Controll;
import com.aspire.nm.component.miniServer.aop.Around;


public class ControllAroundImpl implements Around {

    @Override
    public void before(Controll controll, Method method, Object[] params) {
        System.out.println(controll.getClass().getName());
        System.out.println(method.getName());
        if(params != null && params.length > 1){
            System.out.println(params[0]);
        }
    }

    @Override
    public void after(Controll controll, Method method, Object[] params, Object returnObject) {
        System.out.println(controll.getClass().getName());
        System.out.println(method.getName());
        if(params != null && params.length > 1){
            System.out.println(params[0]);
        }
        System.out.println(returnObject);
    }

}
